using FakeItEasy;
using NUnit.Framework;

namespace BlindData.Between
{
	public class Int32BetweenLowerBound : Behavior
	{
		private IGenerator _generator;
		private int _result;

		protected override void Given()
		{
			_generator = A.Fake<IGenerator>();

			A.CallTo(() => _generator.NextProbability()).Returns(new Probability(0));
		}

		protected override void When()
		{
			_result = _generator.Next<int>().Between(100, 200);
		}

		[Then]
		public void ResultIsLowerBound()
		{
			Assert.That(_result, Is.EqualTo(100));
		}
	}
}